<template>
  <view class="container">
    <view v-for="(item, index) in content">
      <view class="title">{{ item.title }}</view>
      <view class="txt">
        <rich-text :nodes="item.answers"></rich-text>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      content: ''
    };
  },
  methods: {
    // 获取问题
    async getquestion() {
      const res = await uni.$http.post('/index/agreement', {
        type: 'questions_answers'
      });
      console.log('问题', res);
      this.content = res.data.data;
    }
  },
  onLoad() {
    this.getquestion();
  }
};
</script>

<style lang="scss" scoped>
.container {
  box-sizing: border-box;
  padding: 30rpx;
  .title {
    font-weight: bold;
    font-size: 28rpx;
    color: #333333;
  }
  .txt {
    width: 670rpx;
    font-weight: 500;
    font-size: 26rpx;
    line-height: 40rpx;
    margin: 30rpx 0 40rpx 0;
    color: #333333;
  }
}
</style>
